bool ReadFileAtOffset(std::ifstream &file, uint32_t offset, char *buf, uint32_t size)
{
    if(!file.is_open()) {
        LOG_ECMA(ERROR) << "ark raw heap decode file not open";
        return false;
    }
    // if(!file.seekg(0, std::ios::beg)) {
    //     LOG_ECMA(ERROR) << "ark raw heap decode file reset seekg failed, offset=" << offset;
    //     return false;
    // }
    file.clear();
    if(!file.seekg(offset)){
        LOG_ECMA(ERROR) << "ark raw heap decode file set offset failed, offset=" << offset;
        return false;
    }
    if(file.read(buf, size).fail()) {
        LOG_ECMA(ERROR) << "ark raw heap decode file read failed, offset=" << offset;
        return false;
    }
    return true;
}

if (!ReadFileAtOffset(file, offset, reinterpret_cast<char *>(secHead), sizeof(secHead))) {
    LOG_ECMA(ERROR) << "ark raw heap decode read failed, sec="<<sec<<", off=" << ", head obj num=" << secHead[0] << ", head obj size=" << secHead[1];
    return objMap;
}


            auto actSize = i + 1 < secHead[0] ? objTab[i + 1].offset - objTab[i].offset - sizeof(addr_) 
                          : sections[sec + 1] - objTab[i].offset - sizeof(secHead);